import instance from '@/utils/request'
import Qs from 'qs'
/**
 * 分页查询
 */
export const articlePage = (entity) => {
  return instance.get('/article/page?' + Qs.stringify(entity))
}

/**
 * 根据 no 查询 对象
 */
export const articlegetById = (no) => {
  return instance.get('/article/getById?' + Qs.stringify(no))
}

/**
 * 新增
 */
export const articleSave = (entity) => {
  return instance.post('/article/save', Qs.stringify(entity))
}

/**
 * 修改
 */
export const articleUpdateById = (entity) => {
  return instance.post('/article/updateById', Qs.stringify(entity))
}

/**
 * 批量删除
 */
export const articleBatchDelete = (nos) => {
  return instance.get('/article/deletes?nos=' + nos)
}

/**
 * 根据 no 删除
 */
export const articleRemoveById = (no) => {
  return instance.get('/article/removeById?no=' + no)
}

/**
 * 暂存
 */
export const articleZanCunById = (entity) => {
  return instance.post('/article/articleZanCunById', Qs.stringify(entity))
}

/**
 * 根据 发布人 模糊搜索查询
 */
export const getListByAccountName = (accountName) => {
  return instance.get('/article/getListByAccountName?accountName=' + accountName)
}


/**
 * 根据 来源 模糊搜索查询
 */
export const getListBySource = (source) => {
  return instance.get('/article/getListBySource?source=' + source)
}
